package com.hy.erp.inventory.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQuery ;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Index;
/*import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
*/
import com.hy.enterprise.framework.persistence.entity.AbstractPersistentEntity;
import com.hy.erp.inventory.dao.interfaces.IFamilyDao;
import com.hy.erp.inventory.pojo.interfaces.IFamily;
//import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.api.annotation.DaoA;
//import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.entity.AbstractPersistentEntity;
import com.hy.mydesktop.shared.persistence.domain.gxt.MyBaseModel;


/**
 * <ul>
 * <li>开发作者：汤莉</li>
 * <li>设计日期：2010-10-6；时间：下午03:12:27</li>
 * <li>字段类型：long；字段名称：serialVersionUID</li>
 * <li>设计目的：家庭情况</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */

/*@Entity
@Name("family")
@Scope(ScopeType.SESSION)
@Table(name="familys")
@ DaoA ( IFamilyDao.class )
@ NamedQuery ( name = "findFamilyByPersonId" , query = "select p.family from Person p where p.identifier=?")
*/
public class Family extends MyBaseModel //implements IPositonType
//public class Family extends AbstractPersistentEntity implements IFamily
{

	private static final long	serialVersionUID	=
														- 8088425867449651893L ;

	
	
	public Family(){}

	public Family (
					
					String memberName ,
					MembereRelation membereRelation ,
					Contact contact ,
					String component ,
					String remark )
	{
		super ( ) ;
		
	}

	

	@Column(name="memberName",unique=false,nullable=false,insertable=true,updatable=true)
	@Index(name="memberNameIndex")
	public String getMemberName ( )
	{
		return this.get(IFamily.MEMBERNAME) ;
	}

	@OneToOne(targetEntity=MembereRelation.class,fetch=FetchType.LAZY)
	public MembereRelation getMembereRelation ( )
	{
		return this.get(IFamily.MEMBEREPELATION) ;
	}

	@Column(name="contact",unique=false,nullable=true,insertable=true,updatable=true)
	public Contact getContact ( )
	{
		return this.get(IFamily.CONTACT) ;
	}

	@Column(name="component",unique=false,nullable=false,insertable=true,updatable=true)
	public String getComponent ( )
	{
		return this.get(IFamily.COMPONENT) ;
	}

	@Column(name="remark",unique=false,nullable=true,insertable=true,updatable=true)
	public String getRemark ( )
	{
		return this.get(IFamily.REMARK) ;
	}
	
	//########################################################################

	
	public void setMemberName (
								String memberName )
	{
		super.set (IFamily.MEMBERNAME , memberName );
	}

	public void setMembereRelation (
										MembereRelation membereRelation )
	{
		super.set (IFamily.MEMBEREPELATION , membereRelation );
	}

	public void setContact (
								String contact )
	{
		super.set (IFamily.CONTACT , contact );
	}

	public void setComponent (
								String component )
	{super.set (IFamily.COMPONENT , component );
	}

	public void setRemark (
							String remark )
	{super.set (IFamily.REMARK , remark );
	}
	
	
	
}
